#region

using System;
using System.ComponentModel.DataAnnotations.Schema;

#endregion

namespace CuongHanh.Models
{
    [Table("tbl_ProductImage")]
    public class ProductImage : BaseClass
    {
        public ProductImage()
        {
        }

        public ProductImage(int productId,
                string image)
        {
            ProductId = productId;
            Image = image;
            Inactive = false;
            LastModified = DateTime.Now;
        }

        public ProductImage(ProductImage model)
        {
            ProductId = model.ProductId;
            Image = model.Image;
            Inactive = false;
            LastModified = DateTime.Now;
        }

        public int ProductId { get; set; }

        public string Image { get; set; }

        public void UpdateInfoFrom(ProductImage model)
        {
            ProductId = model.ProductId;
            Image = model.Image;
            LastModified = DateTime.Now;
        }
    }
}
